Skip to content

docs: cover CLI tokens, WES and TRS - #136

Merged
uniqueg merged 3 commits into
mainfrom
docs/124-cli-tokens-wes
Nov 13, 2026
Merged

uniqueg merged 3 commits into
mainfrom
docs/124-cli-tokens-wes

Conversation

@uniqueg

@uniqueg uniqueg commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Summary

Updates the researcher page "Use the Command Line" (docs/researchers/cli.md) to ga4gh/ga4gh-sdk main at commit af0e021. Since the last version of the page (8b8030f), the CLI sends tokens, has WES and TRS commands, and supports configuration profiles. The page now covers the steps that #124 and #110 ask for:

  • Log in: get an LS Login access token as "Using the APIs" describes, keep it in a variable (read -rs LS_LOGIN_TOKEN), and name the variable with oauth_access_token_env in the TES/WES sections. Tokens in the file itself are discouraged; the http: warning and the error for an unset variable are documented.
  • Submit a task through the gateway: the TES section points at proTES; tes create/list/get/status/cancel as before, with the checks of tes create and the new error output (HTTP status only, no service answer).
  • Run a workflow: new section for wes run (all options, attachments) and wes list/status/get/cancel.
  • Find workflows: new section for the trs commands against WorkflowHub, including --plain and --zip.
  • Profiles: default_profile, --profile, GA4GH_CLI_PROFILE.
  • What's coming: binaries (ci: publish CLI binaries on version tags ga4gh/ga4gh-sdk#91), container image (#189), TES log/output downloads (#188). The old "Authentication" and "Work without the CLI" sections are gone, because the CLI now covers both.
  • The researchers index row and the demos table row no longer say that the CLI can't send tokens or run workflows.

No mkdocs.yml change: the page is already in the nav.

Closes #124

Light lane: docs only. I reviewed the diff myself against cli/src, the --help output and docs/authentication.md of the SDK; every command and option shown exists at af0e021.

Verification

  • python scripts/check_names.py: passed

  • mkdocs build --strict: passed, no warnings

  • pytest: 25 passed, 100% coverage

  • Built ga4gh-cli at af0e021 in rust:1.97 (cargo build -p ga4gh-cli --locked) and compared all --help outputs with the page

  • Cloud Registry of ELIXIR On-Cloud, anonymously: registry list, list --type tes, get GC6ZQG, types; output as shown

  • WorkflowHub, anonymously: trs tools, tool 3, versions 3, version 3 1, files 3 1 --type CWL (also --zip), descriptor ... --plain, tests

  • Local mock TES/WES at /ga4gh/tes/v1 and /ga4gh/wes/v1, with a dummy token in LS_LOGIN_TOKEN and a profiles file: all tes and wes commands on the page hit the right paths and every request, including service-info, carried the bearer token; --profile before and after the command and GA4GH_CLI_PROFILE both worked; unset variable stops before any request; wrong token gives 401 Unauthorized; absolute attachment paths are rejected

  • CI: all checks passed (PR title, Docs, Test, CI passed, CodeQL, Read the Docs preview)

  • CI after merging main (Krini guide, data centre tutorial; conflict in the researchers index resolved by keeping both rows): all checks passed again

  • Merged main locally first: check_names.py, mkdocs build --strict and pytest passed again

  • Review fixes (Sourcery threads): the page shows unset LS_LOGIN_TOKEN and says that programs started from the terminal can read the variable; it says never to name the token variable in a section with an http: base path (except localhost); and it says that a task or run missing from the list right after an error doesn't prove it was rejected. The CLI itself still sends tokens over http: with a warning; that is CLI behaviour in ga4gh/ga4gh-sdk, outside this repo. After these changes: check_names.py, mkdocs build --strict and pytest (25 passed, 100% coverage) passed locally.

Not checked live

  • The tes and wes steps were not run with a real LS Login token against a deployed proTES or WES of ELIXIR On-Cloud: none is published for researchers yet (the Cloud Registry lists only the BIH Funnel TES and the registry). They were checked against the mock above; the page says so in "How this page was tested".
  • Login uses a token you get yourself, in a variable named by oauth_access_token_env. Per the maintainer's decision (2026-11-13), docs: CLI login and workflow runs #124 documents only this; a device-flow login command (feat(cli): log in with the OIDC device flow ga4gh/ga4gh-sdk#90) is not needed and is not part of this PR, so the page no longer mentions it.

The anchors that docs PR #139 links to (#install, #configure, #log-in-with-ls-login, #find-services-in-the-cloud-registry, #create-a-task, #get-a-task, #get-the-state-of-a-task, #check-for-errors, #start-a-run, #follow-a-run) all exist on the page.

🤖 Generated with Claude Code

Update the CLI user guide to ga4gh/ga4gh-sdk main at af0e021: the CLI
now sends tokens (oauth_access_token_env with an LS Login access token),
has WES and TRS commands and configuration profiles. The page explains
how to get a token and pass it in a variable, sends TES tasks through
proTES, runs and follows WES runs, finds and downloads workflows from
WorkflowHub, and lists what is still planned (device-flow login,
binaries, container image, TES log downloads).

The researchers index and the demos table no longer say that the CLI
can't send tokens or run workflows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sourcery-ai

sourcery-ai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Documentation

Update the CLI guide and its researcher-facing index entries to document token configuration, profiles, TES tasks, WES runs, and TRS workflow discovery against the current SDK.

  • docs/demos/index.md L25
  • docs/researchers/cli.md L110-206, L390-574, L595-607 (+18 small edits)
  • docs/researchers/index.md L14

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@read-the-docs-community

read-the-docs-community Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

@uniqueg
uniqueg marked this pull request as ready for review November 13, 2026 16:31
@sourcery-ai

sourcery-ai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Linked issues

Checked at commit be4934e

#124 docs: CLI login and workflow runs · 1 of 2 met · 1 to check by hand

# Requirement Status Notes
1 The guide covers login, submission through the gateway and running a workflow. ✅ Met The guide explains how to obtain and pass an LS Login token, submit TES tasks via proTES, and run and follow workflows with WES.
2 Each step was run against deployed ELIXIR On-Cloud services. 👀 Check by hand (external system) Verify that deployed services are available and run the login, gateway task-submission, and WES workflow steps against them; the change reports testing only against a local mock for TES/WES.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 3 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="docs/researchers/cli.md" line_range="191" />
<code_context>
+    The section can also hold the token itself (`oauth_access_token`), but
+    then the file keeps it on disk. Use `oauth_access_token_env` instead.
+    Send tokens only over `https`: if `base_path` of a remote service starts
+    with `http:`, the CLI warns, but still sends the token.
+
+If the variable isn't set, the CLI stops before it sends a request, for
</code_context>
<issue_to_address>
**HTTP requests leak access tokens**

When a user configures a remote TES or WES service with an `http:` base path, `ga4gh-cli` warns but still attaches the LS Login bearer token to requests, so anyone able to observe the network traffic can capture and reuse the credential.

Make the CLI refuse to send credentials to remote services over plaintext HTTP.
</issue_to_address>

### Comment 2
<location path="docs/researchers/cli.md" line_range="176" />
<code_context>
+
+    ```bash
+    read -rs LS_LOGIN_TOKEN   # paste the token, then press Enter
+    export LS_LOGIN_TOKEN
+    ```
+
</code_context>
<issue_to_address>
**Tokens persist in child processes**

When a user launches an untrusted program from the same terminal after using the CLI, `export LS_LOGIN_TOKEN` leaves the access token in the shell environment after CLI use, so any subsequently launched untrusted program in that terminal can inherit and read the credential.

Show how to scope the variable to CLI invocations or unset it when CLI use is finished.
</issue_to_address>

### Comment 3
<location path="docs/researchers/cli.md" line_range="384" />
<code_context>
--n "<name of the task>"` whether it exists, so that it doesn't run twice.
+the task runs anyway. The CLI sends a task only once, and its error says so
+when the task may have been accepted. Before you send it again, check with
+`ga4gh-cli tes list -n "<name of the task>"` whether it exists, so that it
+doesn't run twice.

</code_context>
<issue_to_address>
**Duplicate tasks or workflows execute**

When an accepted submission is not yet visible in `tes list` or `wes list`, or another caller retries before it appears, `tes list` or `wes list` returns no match, so the retry guidance leads callers to submit again and the service queues duplicate tasks or workflows.

Revise the retry guidance to explain that a missing listing entry does not establish that a submission was rejected and that resubmitting can create a duplicate.

Also at `docs/researchers/cli.md:434`.
</issue_to_address>

Sourcery assessment

Approval pending. 3 findings to address first.

Blocking findings: docs/researchers/cli.md:191, docs/researchers/cli.md:176, docs/researchers/cli.md:384


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread docs/researchers/cli.md Resolved
Comment thread docs/researchers/cli.md Resolved
Comment thread docs/researchers/cli.md Resolved
Per the maintainer's decision, #124 documents only the token in a
variable named by oauth_access_token_env; a CLI login command is not
needed. Remove the "no login command" warning and the device-flow row
of "What's coming".

Also address review findings: show how to unset the token variable
when done, say never to name it in sections with http: base paths,
and explain that a task or run missing from the list right after an
error doesn't prove it was rejected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@uniqueg
uniqueg merged commit b317d14 into main Nov 13, 2026
17 checks passed
@uniqueg
uniqueg deleted the docs/124-cli-tokens-wes branch November 13, 2026 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: CLI login and workflow runs

1 participant